/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.classdiagram.helper;

import org.eclipse.uml2.uml.Abstraction;
import org.eclipse.uml2.uml.UMLFactory;

import com.cea.papyrus.core.utils.Debug;

/**
 * 
 */
public class EdgeAbstractionHelper extends EdgeDependencyHelper{
	
	///////////////////////////////////////////////////////////////////////////
	// UML Management
	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * 
	 * 
	 * @param umlParent 
	 * @param name 
	 * 
	 * @return 
	 */
	public org.eclipse.uml2.uml.Element createUMLElement(String name, org.eclipse.uml2.uml.Element umlParent){
		Debug.debug(this,"create Abstraction", channel); //$NON-NLS-1$
		Abstraction abstraction = UMLFactory.eINSTANCE.createAbstraction();
//		// no name for this element
//		((Package)umlParent).getPackagedElements().add(abstraction);
//		return abstraction;
		
		abstraction.setName(name);
		addUMLElement(abstraction, umlParent);
		return abstraction;	
	}
	
	/**
	 * 
	 * 
	 * @return 
	 */
	public String getBaseString() {
		return "Abstraction"; //$NON-NLS-1$
	}
}
